<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        .wrap {
            margin: 0 auto;
        }
        .tooltip {
            border: 1px #333 solid;
            height: 40px;
            width: 100px;
            position: relative;
        }
        .tooltip-top:before {
            position: absolute;
            bottom: 100%;
            left: 10px; 
            content: '';
            display: inline-block;
            border-left: 10px transparent solid;
            border-right: 10px transparent solid;
            border-top: 10px transparent solid;
            border-bottom: 10px #333 solid;
        }
        .tooltip-top-transparent:before {
            position: absolute;
            bottom: 100%;
            left: 10px; 
            content: '';
            display: inline-block;
            background: transparent;
            border-left: 10px transparent solid;
            border-right: 10px transparent solid;
            border-top: 10px transparent solid;
            border-bottom: 10px #333 solid;
        }
        .tooltip-top-transparent:after {
            position: absolute;
            bottom: 39px;
            left: 10px; 
            content: '';
            display: inline-block;
            border-left: 10px transparent solid;
            border-right: 10px transparent solid;
            border-top: 10px transparent solid;
            border-bottom: 10px #fff solid;
        }
        .tooltip-inner-right:before {
            position: absolute;
            top: 0;
            right: 0px; 
            content: '';
            display: inline-block;
            border-left: 10px  transparent solid;
            border-right: 10px  #333 solid;
            border-top: 10px  #333 solid;
            border-bottom: 10px transparent solid;
        }
        div {
            margin-top: 20px;
        }
    </style>
</head>
<body>
    <div class="wrap">
         <div class="tooltip tooltip-top"></div>
         <div class="tooltip tooltip-inner-right"></div>
         <div class="tooltip tooltip-top-transparent"></div>
    </div>
</body>
</html>